package com.myself;

import com.myself.api.CarInterface;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.common.utils.StringUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author W.S.
 * @version v1.0.0
 * @description dubbo的spi机制
 * @date Created in 2019/3/19 20:50
 */
public class DubboSPI {
    public static void main(String[] args) {
//        ExtensionLoader<CarInterface> loader = ExtensionLoader.getExtensionLoader(CarInterface.class);
//        CarInterface carInterface = loader.getExtension("bmw");
//        carInterface.sayColor();
        List<String> names = new ArrayList<String>();
        String test = "";
        names.add(test);
        String test2 = "";
        if(!names.contains(test2) || StringUtils.isBlank(test2)){
            names.add(test2);
            System.out.println("1231231");
        }
    }
}
